package kitaplaner.database;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author kristina
 */
public class Urlaubstage {
    
    Kita kita = new Kita();
    Database db = new Database();
    
    private int id;
    private int maId;
    private Date datum;

    public boolean save(Urlaubstage neuerUrlaubstag)
    {
        Connection conn = db.Connect2DB();
        db.insertUrlaubsTag(conn, neuerUrlaubstag);
        kita.setUrlaubstage(db.getUrlaubstage(conn));
        try {
            conn.close();
            return true;
        } catch (SQLException ex) {
            Logger.getLogger(SchichtEintrag.class.getName()).log(Level.SEVERE, null, ex);
            return false;
        }
    }
    
    public Date getDatum() {
        return datum;
    }

    public void setDatum(Date datum) {
        this.datum = datum;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getMaId() {
        return maId;
    }

    public void setMaId(int maId) {
        this.maId = maId;
    }
}
